
#define CHECKOPEN //开启关闭校验
//#define PROPERTY_AUTO_REPLY //开启关闭云端设置属性的自动回应

///////////////////////////////////////  

#define DEVICE_CMD_HEAD 0xD0
#define MCU_CMD_HEAD 0xD1

#define RECV_UART_DATA_MAXLENGTH 80 //mcu上报下发指令最大长度

#define BATH_GET_STATE_TIME 30000   //下发查询指令时间，配网中为5s，其它为30s
#define BATH_UNCONFIGED_GET_STATE_TIME 5000

//////////////

extern unsigned char FACTORY_TEST_FLAG;


//uint8_t get_bath_time(void);
//void start_uart(void);
//uint8_t start_get_state(void);

void ugen_uart_recv_handle(uint8_t *data, uint8_t len );
void ugen_cloud_recv_handle(uint8_t *data , uint8_t len);
void ugen_up_reply(int res,uint8_t msg_type);
uint8_t search_net_state(void);
void check_is_test(void);